import { GaRegExp, ruleInject, ruleInjectable } from "../InjectionRule";
import { blankRemove } from "../methods/blank-remove";

@ruleInjectable()
export default class interfaceRule extends GaRegExp {

	@ruleInject() private variableNameRule!: GaRegExp;

	@ruleInject() private genericRule!: GaRegExp;

	@ruleInject() private typeMapRule!: GaRegExp;

	public RuleInit() {
		this.ParseRule([
			"interface", this.Supply("INTERFACE"), "(&", "\\s", blankRemove, this.variableNameRule, ")?", blankRemove, this.genericRule,
			"(", this.typeMapRule, ")",
		]);
	}

}
